package cn.snowheart.strategy.duck;

import cn.snowheart.strategy.duck.entity.Duck;
import cn.snowheart.strategy.duck.entity.MallardDuck;
import cn.snowheart.strategy.duck.entity.ModelDuck;
import cn.snowheart.strategy.duck.flyable.FlyRocketPowered;

/**
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class DuckTests {

    public static void main(String[] args) {

        // 凫鸭测试类
        Duck duck = new MallardDuck();
        duck.performFly();
        duck.performQuack();
        duck.display();

        // 模型鸭测试类
        duck = new ModelDuck();
        duck.performFly();
        duck.setFlyBehavior(new FlyRocketPowered());
        duck.performFly();
    }

}
